<template>
    <div @click.stop="num++" class="blue">
        <span>{{num+childNum}}</span>
        <green :blueNum="num" @clickBlue="clickBlue"></green>
    </div>
</template>

<script>
import green from "./green.vue";
export default {
    name: "blue", 
    components:{
        green
    },
    data(){
        return {
            num: 0,
            childNum:0
        }

    },
    methods: {
        clickBlue() {
            this.childNum++
        }, 
    },
}
</script>

<style scoped>

</style>